#!D:/CODE/python
# -*- coding: utf-8 -*-
# @Time : 2020/6/18 21:17
# @Author : Alexdong
# @Site : 
# @File : 电影数直方图.py
# @Software: PyCharm
# Functional description:

import pandas as pd
import matplotlib as plt

file_path = ".csv"

df = pd.read_csv(file_path)
print(df.head(1))
print(df.info())

# 分布情况
# 选择图像，   rating,runtime分布情况
# 选择图形，直方图
# 准备数据
runtime_data = df["runtime(Minutes)"].values

max_runtime = runtime_data.max()
min_runtime = runtime_data.min()

# 计算组数
num_bin = (max_runtime - min_runtime) //10

# 设置图形的大小
plt.figure(figsize=(20, 8), dpi=80)
plt.hist(runtime_data, num_bin)
plt.show()






